package com.kazimsoylu.utils;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.kazimsoylu.jpa.model.Employee;

public class EmployeeRowMapper implements RowMapper<Employee> 
{
	@Override
	public Employee mapRow(ResultSet result, int arg1) throws SQLException 
	{
		Employee e = new Employee();
		e.setEmployeeNumber( result.getInt( "employeenumber" ) );
		e.setFirstName( result.getString( "firstname" ) );
		e.setLastName( result.getString( "lastname" ) );
		
		return e;
	}
	
}
